// ProcessThread.cpp : implementation file
//

#include "stdafx.h"
#include "hosts.h"
#include "ProcessThread.h"
#include "hostsDlg.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CProcessThread

IMPLEMENT_DYNCREATE(CProcessThread, CWinThread)

CProcessThread::CProcessThread()
{
}

CProcessThread::~CProcessThread()
{
}

BOOL CProcessThread::InitInstance()
{
	// TODO:  perform and per-thread initialization here
	return TRUE;
}

int CProcessThread::ExitInstance()
{
	// TODO:  perform any per-thread cleanup here
	return CWinThread::ExitInstance();
}

BEGIN_MESSAGE_MAP(CProcessThread, CWinThread)
	//{{AFX_MSG_MAP(CProcessThread)
		// NOTE - the ClassWizard will add and remove mapping macros here.
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CProcessThread message handlers

int CProcessThread::Run() 
{
    this->m_dlg->Run();

	return CWinThread::Run();
}

void CProcessThread::SetDialog( CHostsDlg* dlg )
{
    this->m_dlg = dlg;
}

CHostsDlg* CProcessThread::GetDialog()
{
    return this->m_dlg;
}
